﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Macds.Test.Core.Validation
{
    [TestClass]
    public class ValidatorBaseTest
    {
        [TestMethod]
        public void Validate_join_model_class()
        {
            // Create instance of the join model class
            var joinModel = new Mocks.JoinModel() { Firstname = "John", Lastname = "Smith", Password = "123456" };

            // validate join model
            joinModel = new Mocks.JoinValidator(joinModel).GetValidData();
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentException))]
        public void Validate_join_model_class_exception()
        {
            // Create instance of the join model class
            var joinModel = new Mocks.JoinModel() { Firstname = "", Lastname = "Smith", Password = "123456" };

            // validate join model
            joinModel = new Mocks.JoinValidator(joinModel).GetValidData();
        }
    }
}
